// import { basePermissions } from '@/settings'
import * as userApi from '@/api/user'

export async function getUserInfo() {
  const res = await userApi.getInfo()
  return res.data
}

export async function getPermissions() {
  // // let asyncPermissions = []
  // try {
  //   const res = await userApi.getMenu()
  //   // asyncPermissions = res?.data || []
  // } catch (error) {
  //   console.error(error)
  // }
  // // return basePermissions.concat(asyncPermissions)
  const res = await userApi.getMenu()
  return res.data
}
